<template>
  <div class="home-view">
    <main class="container">
      <h1>Welcome to the Home Page</h1>
      
      <section class="features">
        <div class="feature-card">
          <h2>Vue 3</h2>
          <p>Experience the power of Composition API and the latest Vue features.</p>
        </div>
        
        <div class="feature-card">
          <h2>Vue Router</h2>
          <p>Seamless navigation with advanced routing capabilities.</p>
        </div>
        
        <div class="feature-card">
          <h2>Vite</h2>
          <p>Lightning fast development server and build tooling.</p>
        </div>
      </section>
      
      <div class="cta">
        <router-link to="/about" class="btn">Learn More</router-link>
      </div>
    </main>
  </div>
</template>

<script>
export default {
  name: 'HomeView',
  
  // 使用 Composition API
  setup() {
    return {
      // 可以在这里添加响应式数据或方法
    };
  }
};
</script>

<style scoped>
.home-view {
  padding: 2rem 0;
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  min-height: calc(100vh - 120px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h2 {
  color: #42b983;
  margin-top: 0;
}

.cta {
  text-align: center;
}

.btn {
  display: inline-block;
  background-color: #42b983;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #359c6f;
}
</style>